package org.holynite.fieldmanage.managed.support

import org.holynite.fieldmanage.types.ChargeType

import javax.faces.bean.ApplicationScoped
import javax.faces.bean.ManagedBean

/**
 * Created by midnite on 15/1/31.
 */
@ManagedBean
@ApplicationScoped
class ChargeTypeBean implements Serializable {
    List<ChargeType> types

    ChargeTypeBean() {
        types = ChargeType.values()
    }

    ChargeType findByCodeSign(String code) {
        types.find { it.codeSign.equals(code) }
    }
}
